package com.cdeledu.happensbefore;

public class JoinDemo {

	private static int count = 0;
    public static void main(String[] args) throws InterruptedException {
        Thread t1 = new Thread(() -> {
            // t1 线程修改了变量
            count = 12;
        });
        t1.start();
        t1.join();
        // main 线程可以看到 t1 线程改修后的变量
        System.out.println(count);
    }
	
}
